package action;


import com.ibatis.sqlmap.client.SqlMapClient;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;

import dto.PensionInfo;
import interceptor.IbatisAware;

public class PensionInfo2Action extends ActionSupport implements Preparable,  ModelDriven, IbatisAware{

	public static SqlMapClient sqlMapper;
	private PensionInfo paramClass;
	
	public String execute() throws Exception{
		
		paramClass= (PensionInfo)sqlMapper.queryForObject("pInfoMyPension", paramClass.getPen_num());
		
		return SUCCESS;
	}
	
	public PensionInfo getParamClass(){
		return paramClass;
	}
	public void setParamClass(PensionInfo paramClass){
		this.paramClass = paramClass;
	}

	@Override
	public void setIbatis(SqlMapClient sqlMapper) {
		this.sqlMapper = sqlMapper;
		
	}

	@Override
	public Object getModel() {
		// TODO Auto-generated method stub
		return paramClass;
	}

	@Override
	public void prepare() throws Exception {
		paramClass = new PensionInfo();
		
	}
	
}
